package cn.lidongyu.org.mapper;

import cn.lidongyu.org.domain.Employee;
import cn.lidongyu.org.query.EmployeeQuery;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface EmployeeMapper {
    @Select("select * from  t_employee")
    List<Employee> findAll();

    @Select("select * from t_employee where id=#{id}")
    Employee findOne(Long id);

    void add(Employee employee);

    @Delete("delete from  t_employee where  id=#{id}")
    void delete(Long id);

    void update(Employee employee);


    Long findCount(EmployeeQuery employeeQuery);

    List<Employee> findByQuery(EmployeeQuery employeeQuery);
    void deletemore(List<Long> ids);


}
